package controller.listeners.mainWindow;

import model.MainWindowModel;
import view.MainWindowView;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

/**
 * Acciones del boton de cancelar
 * @author 53385255R
 *
 */
public class CancelListener extends SelectionAdapter {

	private MainWindowModel _model;
	@SuppressWarnings("unused")
	private MainWindowView _view;
	
	/**
	 * @param view
	 * @param model
	 */
	public CancelListener(MainWindowView view, MainWindowModel model) {
		this._model = model;
		this._view = view;
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
	 */
	public void widgetSelected(SelectionEvent event) {
		_model.closeSemaphore();
		_model.cleanThreadQueue();
	}
}
